Re: darwin pgsql patches - Mailing list pgsql-patches

From Peter Bierman
Subject Re: darwin pgsql patches
Date
Msg-id v03130301b653151295a2@[17.202.21.230]
Whole thread Raw
In response to Re: darwin pgsql patches  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
At 2:46 PM -0500 12/5/00, Tom Lane wrote:
>Hm.  It's clearly possible to base Postgres's semaphore stuff on unnamed
>Posix semaphores living in the shared memory area (which eliminates the
>issue of inheritance by child processes).  You'd need to revise the API
>presented by ipc.c so that it doesn't depend on semaphore IDs and keys.

Heh. True, but unfortunately Apple hasn't implemented _unnamed_ POSIX semaphores yet. (Please don't shoot the
messenger,I'll kill myself.) 

But my patch to ipc.c to use named semaphores is actually pretty compact. It conditionalizes the function bodies of
IpcSemaphoreLockand related, and it changes the typedef of a IpcSemaphoreId from a int to a long, so I just pass the
keyused to create the semaphore back as the semid. 

-pmb

--
"Every time you provide an option, you're asking the user to make a decision.
 That means they will have to think about something and decide about it.
 It's not necessarily a bad thing, but, in general, you should always try to
 minimize the number of decisions that people have to make."
 http://joel.editthispage.com/stories/storyReader$51



pgsql-patches by date:

Previous
From: Peter Bierman
Date:
Subject: Re: new darwin patches
Next
From: Nacho Viejo
Date:
Subject: http://www.se.postgresql.org/mhonarc/pgsql-patches/2000-06/msg00012.html